<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>优永动助手 - 社区</title>
    <link rel="stylesheet" href="/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.css">
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
    <script type="text/javascript" src="/layui/layui.all.js"></script>
    <link rel="stylesheet" href="/css/blog.css">
    <style>
        .search-main {
            background-color: unset;
        }

        body {
            height: 1744px;
            background-image: url('../images/shequbg.jpg');
            background-repeat: no-repeat;
            background-size: 100% 100%;
            -moz-background-size: 100% 100%;
            background-attachment: fixed;
        }

        .item-big-box {
            width: 100%;
            background-color: #008d00;
            border-radius: 20px;
            padding-bottom: 50px;
            font-size: 36px;
            margin-top: 80px;
        }

        .item-box-title {
            height: 60px;
            background-color: #f8d351;
            border-radius: 30px;
            text-align: center;
            margin-top: -30px;
            color: #774b00;
            font-weight: 700;
            padding-top: 5px;
        }

        .item-box {
            width: 96%;
            background-color: #fff;
            border-radius: 20px;
            padding-top: 30px;
            padding-bottom: 30px;
            margin-top: 30px;
            margin-left: 2%;
            text-align: center;
            color: #438fe7;
        }

        .bottom-txt {
            font-size: 32px;
            color: grey;
        }

        .num-txt {
            font-size: 48px;
            font-weight: 700;
            margin-top: 20px;
            margin-bottom: 10px;
        }

        .blog-main {
            padding-top: 300px;
            padding-bottom: 300px;
        }

        .mytable thead tr {
            font-size: 36px;
            line-height: 80px;
        }

        .mytable tbody tr {
            font-size: 36px;
            line-height: 80px;
        }

    </style>
</head>
<body>

<div class="layui-row search-main log-title">

    <div class="layui-col-xs2" onclick="history.go(-1)">
        <i class="layui-icon layui-icon-left return-btn"></i>
    </div>

    <div class="layui-col-xs2 layui-col-xs-offset3">社区</div>

</div>


<div class="layui-row blog-main">

    <div class="layui row item-big-box">

        <div class="layui-row">
            <div class="layui-col-xs4 layui-col-xs-offset4 item-box-title">直推人数</div>
        </div>

        <div class="layui-row item-box">
            <div class="layui-col-xs6">
                <div class="layui-row num-txt" th:text="${zhituijihuo}==null?'0':${zhituijihuo}"></div>
                <div class="layui-row bottom-txt">已激活</div>
            </div>
            <div class="layui-col-xs6">
                <div class="layui-row num-txt" th:text="${zhituiwuxiao}==null?'0':${zhituiwuxiao}">0</div>
                <div class="layui-row bottom-txt">未激活</div>
            </div>
        </div>

        <div class="layui-row item-box">
            <div class="layui-col-xs6">
                <div class="layui-row num-txt" th:text="${#numbers.formatDecimal(zall,1,4)}==null?'0':${#numbers.formatDecimal(zall,1,4)}">0</div>
                <div class="layui-row bottom-txt">直推总盈利</div>
            </div>
            <div class="layui-col-xs6">
                <div class="layui-row num-txt" th:text="${#numbers.formatDecimal(ztoday,1,4)}==null?'0':${#numbers.formatDecimal(ztoday,1,4)}">0</div>
                <div class="layui-row bottom-txt">直推今日盈利</div>
            </div>
        </div>
    </div>


    <div class="layui row item-big-box">

        <div class="layui-row">
            <div class="layui-col-xs4 layui-col-xs-offset4 item-box-title">社区人数</div>
        </div>

        <div class="layui-row item-box">
            <div class="layui-col-xs6">
                <div class="layui-row num-txt" th:text="${shequjihuo}==null?'0':${shequjihuo}">0</div>
                <div class="layui-row bottom-txt">已激活</div>
            </div>
            <div class="layui-col-xs6">
                <div class="layui-row num-txt" th:text="${shequwuxiao}==null?'0':${shequwuxiao}">0</div>
                <div class="layui-row bottom-txt">未激活</div>
            </div>
        </div>

        <div class="layui-row item-box">
            <div class="layui-col-xs6">
                <div class="layui-row num-txt" th:text="${#numbers.formatDecimal(sall,1,4)}==null?'0':${#numbers.formatDecimal(sall,1,4)}">0</div>
                <div class="layui-row bottom-txt">社区总盈利</div>
            </div>
            <div class="layui-col-xs6">
                <div class="layui-row num-txt" th:text="${#numbers.formatDecimal(stoday,1,4)}==''?'0':${#numbers.formatDecimal(stoday,1,4)}">0</div>
                <div class="layui-row bottom-txt">社区今日盈利</div>
            </div>
        </div>
    </div>


    <div class="layui-row item-big-box">

        <div class="layui-row">
            <div class="layui-col-xs4 layui-col-xs-offset4 item-box-title">直推用户</div>
        </div>

        <div class="layui-row item-box">
            <table class=" mytable">

                <thead>
                <tr>
                    <th width="5%">ID</th>
                    <th width="10%">账号</th>
                    <th width="10%">激活</th>
                    <th width="8%">点数</th>
                    <th width="8%">直推</th>
                    <th width="8%">社区</th>
                    <th width="15%">时间</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="user:${userZhituiList}">
                    <td th:text="${user.userid}">1</td>
                    <td th:onclick="'javascript:toModulePage(\''+${user.userid}+'\');'"
                        th:text="${user.username}">test123
                    </td>
                    <td th:text="${user.youxiaotime}">1989h</td>
                    <td th:text="${user.getdianshuvo()}">30</td>
                    <td th:text="${user.zhituinum}">2</td>
                    <td th:text="${user.shequnum}">6</td>
                    <td th:text="${#dates.format(user.createtime,'yyyy-MM-dd')}">3</td>
                </tr>
                </tbody>
            </table>
        </div>

    </div>
    <input type="hidden" id="fresh" value="0">

</div>
<script>
    function toModulePage(userid) {
        layui.use('layer', function () {
            var layer = layui.layer;
            //prompt层

            layer.open({
                type: 2,
                title: '设置点数',
                shadeClose: true,
                shade: 0.8,
                area: ['90%', '500px'],
                content: '/person/setdianshuPage?userid=' + userid,
                end: function () {
                    if ($("#fresh").val() == 1) {
                        window.location = "/shequ";
                    }

                }
            });

        });

    }
</script>

</div>
</body>
</html>